#pragma once
#include <string>

class IBBS2chProxySocket {
public:
	virtual ~IBBS2chProxySocket(){};
	virtual int read(char *buffer, int length) = 0;
	virtual int readLine(char *buffer, int maxLength) = 0;
	virtual int write(const char *buffer, int length) = 0;
	virtual int writeString(const std::string &str) = 0;
	virtual void close(void) = 0;
	void sendBasicHeaders(int respCode, const char *respMsg);
	void sendResponse(int respCode, const char *respMsg);
	size_t readChunkedBodyIntoBuffer(char **bufferOut);
};
